package com.CST.mapper.cst.ys;

import com.CST.dto.ys.YsOrganizationDTO;
import com.CST.entity.ys.YsBusinessBudgetData;
import com.CST.entity.ys.YsManageBudgetData;
import com.CST.entity.ys.YsOrganization;
import com.CST.vo.ys.YsBusinessBudgetDataVO;
import com.CST.vo.ys.YsManageBudgetDataVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 预算编制页面-编制
 *
 * @author cw
 * @since 2023-05-15
 */
@Mapper
public interface YsOrganizationMapper extends BaseMapper<YsOrganization> {

    /**
     * 取消发布
     * @param year id
     * @return result
     */
    Boolean cancelRelease(Integer year);

    /**
     * 完成编制
     * @param year 年份
     * @return result
     */
    Boolean finishOrganization(Integer year);

    /**
     * 根据年查询是否已经存在编制
     * @param year 年
     * @return result
     */
    int selectByYear(Integer year);

    Boolean releaseBusinessOrganizationData(List<YsBusinessBudgetDataVO> data);

    void deleteReByYear(Integer year);

    void deleteManageReByYear(Integer year);

    Boolean releaseManageOrganizationData(List<YsManageBudgetDataVO> ysManageBudgetData);

    Boolean releaseOrganization(Integer year);

    List<YsOrganization> selectList(YsOrganizationDTO dto);
}
